#pragma once

#include <QDialog>
#include "Protocol.h"

namespace Ui {
    class ChatWindow;
}

// 聊天窗口
class ChatWindow: public QDialog {
    Q_OBJECT

    signals: void UM_CHAT_C2S(ChatInfo*);   // 聊天事件（客户端到服务器）

    private: Ui::ChatWindow* ui;    // 界面
    private: QString mFriendName;   // 好友名

    public: explicit ChatWindow(const char*, QWidget*);
    public: ~ChatWindow();
    private slots: void on_buttonSend_clicked();
    private slots: void on_editInput_textChanged();
    public: void setContent(ChatInfo*);
};
